<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>getElementsByName</title>
  ，

</head>
<body>
 你会的运动是:
<input type="checkbox" name = "sport" value="足球" checked>足球
<input type="checkbox" name = "sport" value="篮球">篮球
<input type="checkbox" name = "sport" value="排球">排球
<input type="checkbox" name = "sport" value="乒乓球">乒乓球<br/>

<button onclick="selectAll()">全选</button>
<button onclick="selectNone()">全不选</button>
<button onclick="selectInverse()">反选</button>

</body>
</html>
